home *** CD-ROM | disk | FTP | other *** search
/ Practical Web Pages 2004 September / PracticalWebPages-WPG13-09-2004-Coverdisc.iso / pc / Software / Toolkit / Sothink SWF Quicker 1.5 / data1.cab / Public_Files / Classes / Sound.as < prev    next >
Encoding:
Text File  |  2004-06-14  |  2.5 KB  |  24 lines

  1. class Sound
  2. {
  3.     var duration                                                         // The number of milliseconds a sound lasts.
  4.     var id3                                                              // Provides access to the metadata that is part of an MP3 file.
  5.     var position                                                         // The number of milliseconds a sound has been playing. 
  6.  
  7.     function getTransform()                                              // Returns the sound transform information for the specified Sound object set with the last "Sound.setTransform()" call.
  8.     function getVolume()                                                 // Returns an integer(0-100) indicating the sound volume level. 
  9.     function loadSound(url, isStreaming)                                 // Loads an MP3 file into a Sound object. 
  10.     function setPan(pan)                                                 // Sets the pan level to decide how the sound is played in the left and right channels.
  11.     function setTransform(soundTransformObject)                          // Sets the sound transform information for a Sound object.
  12.     function setVolume(volume)                                           // Sets the volume for the Sound object.
  13.     function start(secondOffset, loop)                                   // Starts playing the sound from the beginning or at the point the "secondOffset" parameter specifies.
  14.     function stop(idName)                                                // Stops all sounds being played currently or the sound specifiedd in the "idName" parameter.
  15.     function attachSound(idName)                                         // Attaches the sound specified in the "idName" parameter to the specified Sound object.
  16.     function getBytesLoaded()                                            // Returns the number of bytes the specified Sound object has loaded. 
  17.     function getBytesTotal()                                             // Returns the number of bytes, indicating the size of the specified Sound object.
  18.     function getPan()                                                    // Controls the left-right balance of the sounds in a SWF file.
  19.  
  20.     function onID3()                                                     // Provides access to ID3 data without polling.
  21.     function onLoad()                                                    // Invoked automatically when a sound loads. 
  22.     function onSoundComplete()                                           // Triggers events in a SWF file when a sound finishes playing.
  23. }
  24.